﻿package com.ease.model.type
{
	import com.ease.common.enums.ValuableEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.ease.model.type.DateDay;

	[Bindable]
	[RemoteClass(alias="com.ease.model.type.DateDay")]

	public class DateDay extends Enum
	{
		/* static init */
		{ initEnum(DateDay); }

		/* Constants */
		public static const Sunday:DateDay = new DateDay("Sunday", 1, "日");
		public static const Monday:DateDay = new DateDay("Monday", 2, "一");
		public static const Tuesday:DateDay = new DateDay("Tuesday", 3, "二");
		public static const Wednesday:DateDay = new DateDay("Wednesday", 4, "三");
		public static const Thursday:DateDay = new DateDay("Thursday", 5, "四");
		public static const Friday:DateDay = new DateDay("Friday", 6, "五");
		public static const Saturday:DateDay = new DateDay("Saturday", 7, "六");

		private var _value:int;
		private var _text:String;

		/*public*/ function DateDay(name:String=null ,value:int=0 ,text:String=null) {
			super.name = name;
			this._value = value;
			this._text = text;
		}

		public function get value():int  { return this._value; }
		public function get text():String  { return this._text; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(DateDay);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):DateDay {
			return DateDay(Enum.get(DateDay, constantName, caseSensitive));
		}
	}
}